# ifndef __NMEA0183_H_
# define __NMEA0183_H_

# include "GpsProtocol.h"
# include "Positioning.h"

const size_t MAX_NMEA_SENTENCE = 128; // Really is 72, but not clear which part of sentence is implied.

class CNMEA0183 : public CGpsProtocol {
  public:
	// Override.
	virtual void GetName (string_t & _strName) const;
	virtual void Start ();
	virtual void Stop () {}
	virtual CGpsProtocol::Status_t OnDataReceived (const BYTE * _pData, size_t _cSize);

  private:
	char m_strSentence [MAX_NMEA_SENTENCE];
	size_t m_cSentenceLen;

	DWORD m_dwLastDataTime;
	DWORD m_dwLastSaveTime;
	bool m_bDirty;

	PositionInfo_t m_pi;
};

# endif // __NMEA0183_H_